QuestionResponse

fun QuestionResponse(radioOptions: List<String>, selectedOption: Int, onSelect: (Int) -> Unit)

Composable function to display a list of radio button options for a question.

displays a list of radio options and allows the user to select one. selected option is visually highlighted, and the onSelect lambda is called whenever an option is clicked.

Parameters

radioOptions

A list of strings representing the options available to the user.

selectedOption

The index of the currently selected option. This will determine which option is visually highlighted.

onSelect

A lambda function to handle the selection of an option. It takes the index of the selected option as a parameter.